import React from 'react';
import ReactDOM from 'react-dom/client';

let element = (
  <div className="title" style={{color: 'red'}}>
    <span>hello</span>
  </div>
)

// React元素
console.log(element);
// 创建真实domRoot
const root = ReactDOM.createRoot(
  document.getElementById('root')
)
// 把react元素渲染到DomRoot
root.render(element);

